package ooday02;

/**
 * Person家族的测试类
 */
public class ExtendsTest {
    public static void main(String[] args) {
        Student student = new Student();
        student.name = "吴羽";
        student.age=22;
        student.address = "涟源";
        student.stuId = "2005010616";
        student.className = "计算机科学与技术5班";
        student.sayHi();
        student.study();//学生类独有的方法
        student.eat();
        student.sleep();

        Teacher teacher = new Teacher("吴羽与", 30,
                "涟源", 15000.0);
        teacher.sayHi();
        teacher.teach();//老师类独有的方法
        teacher.sleep();
        teacher.eat();

        Doctor doctor = new Doctor("吴羽羽羽", 50,
                "深圳", "外科医生");
        doctor.sayHi();
        doctor.eat();
        doctor.sleep();
        doctor.cut();//医生类独有的方法
    }
}
